#pragma once

struct IEvent;

/**
Holds the OnEvent function.
All classes that want to register for events must inherit from this 
and implement the OnEvent function.
*/
class IEventListener
{
public:

	IEventListener()
	{
		numInstances++;
		id = numInstances;
	}

	virtual ~IEventListener(){}

	/**
	Called by the event manager.
	@param eEvent Passed by the event manager.
	@see IEvent
	*/
	virtual void OnEvent(IEvent *eEvent) = 0;

	/** Used to distribute ids of listeners */
	static int numInstances;
	/** The id of a listener instance */
	int id;

};

/**
Structure used to create event listeners.
This is used internally by the event manager.
*/
struct IListenerEx
{	
public:
	virtual ~IListenerEx(){};
};